import Vue from 'vue'
import VueRouter from 'vue-router'
import Users from '../views/Users.vue'
import Orders from '../views/Orders.vue'
import loginForm from '../views/loginForm.vue'
import home from'../views/home.vue'
import CommonAside from '@/components/CommonAside.vue'
import CommonHeader from '@/components/CommonHeader.vue'
import Score from '@/views/Score.vue'
import Main from '../views/Main.vue'




Vue.use(VueRouter)

const routes = [
  
  {
    path: '/',
    name: 'login',
    component: loginForm
  },
  {
  path:'/',
  component: Main,
  children:[
    {
      path: '/home',
      name: 'home',
      component: home
    },


{
  path:'/score',
  name:'score',
  component: Score
  
},

  {
    path: '/aside',
    name: 'aside',
    component: CommonAside
  },
  {
    path: '/header',
    name: 'header',
    component: CommonHeader
  },

  {
    path: '/users',
    name: 'users',
    component: Users
  },
  {
    path: '/orders',
    name: 'orders',
    component: Orders
  }
  ]},
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
